import logbook

logger = logbook.Logger('MyApp')
file_handler = logbook.FileHandler('myapp.log')
logger.handlers.append(file_handler)


def divide(x, y):
    try:
        result = x / y
        logger.info(f'Division result: {result}')
    except ZeroDivisionError as e:
        logger.error(f'Division by zero: {e}')


divide(10, 2)
divide(10, 0)
